<html>
<script>
function formatNumber({value=0, decimals=0, asPercent=false, prefix="", suffix=""}) {
	console.log("value: " + value + " decimals: " + decimals 
		 + " asPercent: " + asPercent + "prefix: " + prefix + " suffix: " + suffix);
}

var num = 20;
formatNumber({value: num, suffix:'%'});
</script>
</html>